<?php
include "dbconnect.php";
$term=$_POST["term"];
$year=$_POST["year"];
$con=mysql_connect($dbHost,$dbUserAndName,$dbPass);
mysql_select_db($_DB_NAME,$con);
$result =	mysql_query("select * from openings where semid in (select semid from semester where term='".$term."' and year='".$year."')");
$row = mysql_fetch_array($result);
if(empty($row[0])==true)	
{
	echo 0;
}
else
{
	echo 1;
}
?>
